Skip to content

Synthesizer class#103

Merged
marcosfrenkel merged 5 commits intotoolsforexperiments:mainfrom
osn07:synthesizer-class
Mar 5, 2026
Merged

Synthesizer class#103
marcosfrenkel merged 5 commits intotoolsforexperiments:mainfrom
osn07:synthesizer-class

Conversation

@osn07
Copy link
Contributor

@osn07 osn07 commented Feb 25, 2026

Basic frame for data synthesizer.

…ract model()

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copy link
Contributor

@marcosfrenkel marcosfrenkel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add some implemented examples of how this would look like? You can have some generic functions (Gaussian, exponential, sine, etc.) and in the comments write how an example would look like.

How are the parameters handled? What should I do if I want to generate 2 different sets of data with different parameters?

pass

def generate(self, coordinates):
return self.model(coordinates) + self.noise()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are calling the self.noise() function here, but there is no way to pass a different std value when generating the data.

…ial, sine, and gaussian class implementations
… are now static methods. Parameters can be set at instantiation or overridden in generate().

import numpy as np

import dataclasses
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
import dataclasses
from dataclasses import dataclass


"""

@dataclasses.dataclass
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
@dataclasses.dataclass
dataclass

return np.random.normal(scale = std, size = len(coordinates))


@dataclasses.dataclass
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
@dataclasses.dataclass
dataclass




@dataclasses.dataclass
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
@dataclasses.dataclass
dataclass

return A * np.sin(2 * np.pi * coordinates * f + phi) + of


@dataclasses.dataclass
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
@dataclasses.dataclass
dataclass

@marcosfrenkel marcosfrenkel merged commit 1172297 into toolsforexperiments:main Mar 5, 2026
@osn07 osn07 deleted the synthesizer-class branch March 5, 2026 22:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants